﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GDoc.Domain.Services
{
    public class DisplayOrderComparer : IComparer<int?>
    {
        #region IComparer<int?> Members

        public int Compare(int? x, int? y)
        {
            if (x == null && y == null)
                return 0;

            if (x == null)
                return 1;

            if (y == null)
                return -1;

            if (x > y)
                return 1;

            if (x < y)
                return -1;

            return 0;
        }

        #endregion
    }
}
